داستان آبیدیک

onion architecture


فارسی

1 کامپیوتر و شبکه:: onion architecture

hi and welcome to this new series where we are going to try and build a new version of the 2017 series that I made Called dumb at core angle of building web application series to software architecture right so what am I going to do here well I'm going to switch the good old tree let architecture that we used in the last series I made in 2017 I'm going to use a new architecture Called the onion architecture or also Called the clean architecture instead in this new series so it's going to be Pretty much the same domain the same application everything will look the same when we talk about domain but it'll be a new architecture so you guys can Kind of pick between two different architectures if you want to you have the good old tree layout architecture that everybody knows or you have the clean and the onion architecture that's kind of the new boy that's going to try and conquer the world right so now you Will have both choices now I feel the dotnet core framework and the power it has with dependency injection it makes Sense to start moving towards of Architect that that supports dependency injection and the things that we gain with dependency injection so that's kind of why I want to move over to the clean architecture and don't worry we'll dive Into what all of this is in next egg During this series right so whilst on The next video just explain what the architecture is all about but I also want to tell you guys before we start That this is actually a second part of this series is actually from the first Part is actually the c-sharp basic right here and that's the one that you should watch before you go and if you have no clue on how to start with Visual Studio and work with dotnet core and stuff like that there's just some basic information Right here so let's get started the next lesson where we'll kind of jumpinto some Microsoft stuff and explain to you The way that we moved from a good old tree layer architecture into maybe wanting a clean architecture instead so see you next have fun. with multiple layers as each of them would be a project so think of each layer right here as a project and a solution in this case right here sweet let's scroll further down because then they start talking about how that would work and how you would implement it but then we get to something cool the clean architecture the new idea right the new guy on the street that we are going to start using in this series right here instead of the old tree layered architecture it's also called the onion architecture now and then but it's kind of they have the same idea they have in the center everything you have the domain the domain logic so think of this way everything that has to do with the actual application everything customer specific domain specific for the application we're going to place that in here then we're going to add an infrastructure layer down here and that's kind of going to be the road to persist the data the place where we put locking the place that we put stuff that's required to run an application because we need to save our data right but the domain the core of the application doesn't know any need to know anything about how you save the data you could save it in a data file you could save it maybe just as an XML file on your machine you could save it on a database like we're going to end up an SQL database but it could also be a Mongo database you could save it using transactions if you want you can also skip transaction if you don't want that etc setter so there's a lot of information about how you store and retrieve data that hasn't nothing to do with the application core ok you say interfaces that's also pulled out of the domain ma-ma the domain descent off the application right here so we put that on the outside and you end up with something looking like this so this is the new clean architecture showing the same setup that we did with the tree layer architecture now again I know this might not make sense yet but think of this way the course at the bottom now if we go backup here notice the difference in the old version the data access layer was at the bottom meaning that the data access layer was actually the lowest layer in the old set up meaning that this was the thing that this guy depended on and also a lot of times this guy depended on but now in the new setup everybody depends instead of on the domain logic the center right so everybody depends on that inside the application call right here so that means that the infrastructure will depend on this guy the test will depend on this guy and the user interface so this will be the heart of the entire application this might be a tough one but don't worry as we start moving forward and I start making this architect we'll come back to it and I'll try and show you why I'm doing what I'm doing right and this is just an example code of that and here we put in the unit test into our onion architecture right

واژگان شبکه مترجمین ایران


معنی‌های پیشنهادی کاربران

نام و نام خانوادگی
شماره تلفن همراه
متن معنی یا پیشنهاد شما
Captcha Code